GXSetColorProfile
You can use theGXSetColorProfile
function to assign profile data to a color profile object.
void GXSetColorProfile(gxColorProfile target,long size, void *colorProfileData);
target
- A reference to the color profile object whose profile data you want to change.
size
- The size in bytes of the profile data to assign to the target color profile.
- colorProfileData
- A pointer to the profile data.
DESCRIPTION
The GXSetColorProfile function assigns the specified profile data to the target color profile. If you specify a nonzero value for thesize
parameter, the pointer to the profile data must not benil
. It should be in the form of a valid ColorSync color profile structure (typeCMProfile
), although the function does not actually verify this.If you pass 0 for the
size
parameter to this function, QuickDraw GX converts this profile into a zero-length profile, which you can use to inhibit color matching.SPECIAL CONSIDERATIONS
If you attempt to alter the profile data of a color profile object used by an onscreen view device, this function posts a colorProfile_access_restricted warning.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory colorProfile_is_nil inconsistent_parameters (debugging version) parameter_out_of_range (debugging version) Warnings colorProfile_access_restricted (debugging version) SEE ALSO
To examine the profile data in a color profile object, use theGXGetColorProfile
function, described in the previous section.Zero-length profiles are described in the section "Zero-Length Profiles" on page 4-37.
The format of the profile data in a color profile object is described in the section "Profile Data" beginning on page 4-36. The ColorSync Utilities, including the
CMProfile
data type, are described in Inside Macintosh: Advanced Color Imaging.